package cn.crex1.xiaomi.core.orm.type.converter;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DateTypeConverter {
	public Date converterType(String type) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
		try {
			return sdf.parse(type);
		} catch (ParseException e) {
			e.printStackTrace();
		}
		return null;		
	}
	public Date converterTypetoDate(java.sql.Date date_sql) {
		Date date = new Date(date_sql.getTime());
		return date;	
	}
}

